package com.shelpe.services.keywords.entity.jpa;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Id;
import com.fasterxml.jackson.annotation.JsonProperty;

import com.shelpe.services.keywords.service.utils.EntityUtils.OnlineStatusConverter;

import lombok.Data;

@Entity(name = "campaigns")
@Data
public class Campaign {

	@Id
	@Column(name = "campaign_id")
	@JsonProperty("campaign_id")
	private long autoID;
	@Column(name = "user_id")
	@JsonProperty("user_id")
	private long userID;

	@JsonProperty("online_status")
	@Convert(converter = OnlineStatusConverter.class)
	private OnlineStatus onlineStatus;
	@JsonProperty("settle_status")
	@Convert(converter = OnlineStatusConverter.class)
	private OnlineStatus settleStatus;

	@JsonProperty("create_time")
	private Date createTime;
	@JsonProperty("modified_time")
	private Date modifiedTime;
}
